package com.kws.merchant.domain;


import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.Date;
import java.io.Serializable;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 运维-两票管理(OperationTicket)表实体类
 *
 * @author yxy
 * @since 2024-10-28 08:54:05
 */
@Data
@ApiModel("运维-两票管理")
@TableName(value = "tb_operation_ticket")
public class OperationTicket extends Model<OperationTicket> implements Serializable {
    private static final long serialVersionUID = 587704706945064240L;

    @TableId(type = IdType.AUTO)
    @ApiModelProperty("$column.comment")
    private Long id;

    @ApiModelProperty("票号")
    private String ticketNo;

    @ApiModelProperty("文件")
    private String file;

    @ApiModelProperty("票类型0工作票 1操作票")
    private Integer type;

    @ApiModelProperty("工作票类型0电气带电作业 1电气第一种 2电气第二种 3紧急抢修工作票")
    private Integer workType;

    @ApiModelProperty("工作负责人-监护人")
    private Long workPrincipal;

    @ApiModelProperty("工作负责人-监护人姓名")
    @TableField(exist = false)
    private String workPrincipalName;

    @ApiModelProperty("工作班成员")
    @TableField(exist = false)
    private List<OperationTicketMember> memberList;

    @ApiModelProperty("任务")
    @TableField(exist = false)
    private List<OperationTicketTask> taskList;

    @ApiModelProperty("计划工作时间-操作时间")
//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GTM+8")
    private String workTime;

    @ApiModelProperty("安全措施")
    private String safetyPrecautions;

    @ApiModelProperty("状态0已处理 1未处理 2作废")
    private Integer status;

    @ApiModelProperty("操作票类型0倒闸 1检修 2特殊 3临时 4紧急")
    private Integer handleType;



    @ApiModelProperty("项目名称")
    @TableField(exist = false)
    private String itemName;

    @ApiModelProperty("操作任务")
    private String handleTask;

    @ApiModelProperty("项目")
    @TableField(exist = false)
    private List<OperationTicketItem> itemList;

    @ApiModelProperty("操作人")
    private Long handleOperator;

    @ApiModelProperty("操作人名称")
    @TableField(exist = false)
    private String handleOperatorName;

    @ApiModelProperty("监护人")
    private Long handleGuardian;

    @ApiModelProperty("监护人名称")
    @TableField(exist = false)
    private String handleGuardianName;

    @ApiModelProperty("商家")
    private Long merchantId;

    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GTM+8")
    @ApiModelProperty("创建时间")
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GTM+8")
    @ApiModelProperty("修改时间")
    private Date updateTime;
}
